package com.lijian.controller;

import com.lijian.base.Result;
import com.lijian.model.SysRoleUser;
import com.lijian.service.RoleUserService;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/roleuser")
public class RoleUserController {

    @Autowired
    private RoleUserService roleUserService;

    @ApiOperation(value = "获取当前用户角色", notes = "获取当前用户角色")//描述
    @ApiImplicitParam(name = "userId",value = "用户Id", required = true)
    @GetMapping("/findRoleUserByUserId")
    public Result<SysRoleUser> findRoleUserByUserId(Integer userId){
        return roleUserService.findRoleUserByUserId(userId);
    }
}
